home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / usr / sybase / doc / dbsetidle.man < prev    next >
Text File  |  1993-04-22  |  3KB  |  89 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                dbsetidle
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbsetidle
  6.  
  7.   FUNCTION:
  8.        Call a user-supplied function when DB-Library is finished reading
  9.        from SQL Server.
  10.  
  11.   SYNTAX:
  12.        void dbsetidle(dbproc, idlefunc)
  13.  
  14.        DBPROCESS *dbproc;
  15.        void      (*idlefunc)();
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbsetidle               Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.   COMMENTS:
  28.  
  29.        o This routine  associates  a  user-supplied  function  with  the
  30.          specified  dbproc.   The  user-supplied function will automati-
  31.          cally be called when DB-Library is finished reading or  waiting
  32.          to  read  a  packet of output from SQL Server.  For example, an
  33.          application may want to print a message whenever SQL Server has
  34.          finished  sending data to the host.  dbsetidle() will cause the
  35.          user-supplied function idlefunc() to be called in this case.
  36.        o Similarly, dbsetbusy() may also be used to  associate  a  user-
  37.          supplied  function, busyfunc(), with a dbproc.  busyfunc() will
  38.          automatically be called whenever DB-Library is reading or wait-
  39.          ing to read a packet of output from SQL Server.
  40.  
  41.        o The server sends result data to the application in  packets  of
  42.          512  bytes.   (The final packet in a set of results may be less
  43.          than 512 bytes.) DB-Library calls busyfunc() at  the  beginning
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                dbsetidle
  47.   ______________________________________________________________________
  48.          of each packet and idlefunc() at the end of  each  packet.   If
  49.          the  output  from the server spans multiple packets, busyfunc()
  50.          and idlefunc() will be called multiple times.
  51.  
  52.        o See the dbsetbusy() manual page for an  example  of  installing
  53.          and defining busyfunc() and idlefunc().
  54.  
  55.   PARAMETERS:
  56.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  57.            connection for a particular front-end/SQL Server process.  It
  58.            contains all the information that DB-Library uses  to  manage
  59.            communications and data between the front end and SQL Server.
  60.        idlefunc -  The user-supplied function that  will  be  called  by
  61.            DB-Library  whenever  SQL Server has finished sending data to
  62.            the host.  DB-Library calls idlefunc() with  two  parameters-
  63.            the  return  value  from  busyfunc() (a pointer to a function
  64.            that returns an integer) and a pointer to the DBPROCESS  from
  65.            the dbsetidle() call.
  66.  
  67.  
  68.   dbsetidle               Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.            idlefunc() returns void.
  71.  
  72.   RETURNS:
  73.        None.
  74.  
  75.   SEE ALSO:
  76.        dbsetbusy
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.